<template>
	<view>
		<view class="ClassImage">
			<view class="ClassImage-title" @tap="handeshow">
				<text>班级群二维码</text><text :class="!openimage?'cuIcon-right':'cuIcon-unfold'"></text>
			</view>
			<view class="ClassImage-content" v-if="openimage">
				<image :src="imgurl" mode="widthFix" show-menu-by-longpress="true"></image>
			</view>
		</view>
	</view>
	<view class="cu-timeline">
		<template v-for="item in DAT" :key="item.rowid">
			<view class="cu-time" style="width:200rpx;font-weight: 600;">{{item.CLASS_DATE}}</view>
			<view class="cu-item cur cuIcon-noticefill" >
				<view class="content bg-green shadow-blur">
					<text></text> {{item.TIME_NAME}}
				</view>
			</view>
		</template>
	</view>
</template>

<script lang="ts" setup>
	const openimage = ref<any>(false)
	import {onMounted,reactive,ref} from "vue"
	import {onLoad} from "@dcloudio/uni-app";
	import {useSyllabusDetail} from "./useDetali"
	const {initSyllabusDetail,DAT,imgurl} = useSyllabusDetail()
	onLoad((option:any)=>{
		initSyllabusDetail(option)
	})
	function handeshow(){
		openimage.value = !openimage.value
	}
</script>

<style lang="scss">
	.ClassImage{
		width: 700rpx;
		background-color: white;
		border-radius: 5rpx;
		margin-left: 25rpx;
		margin-top: 20rpx;
		margin-bottom: 20rpx;
		box-shadow: #585850 10rpx 10rpx 10rpx;
		.ClassImage-title{
			height: 100rpx;
			width: 700rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}
		.ClassImage-content{
			width: 100%;
			display: flex;
			justify-content: center;
		}
	}
</style>